import { COMMENTUSERINFO, HOTLIST, USERINFO } from './actiontype';

// 评论时用户信息
let commentUserInfo = null;
const commentUserInfoInStorage = localStorage.getItem(COMMENTUSERINFO);
if (commentUserInfoInStorage) {
  commentUserInfo = JSON.parse(commentUserInfoInStorage);
}

let hotList = null;
const hotListStorage = sessionStorage.getItem(HOTLIST);
if (hotListStorage) {
  hotList = JSON.parse(hotListStorage);
}

let userInfo = null;
const userInfoInStorage = localStorage.getItem(USERINFO);
if (userInfoInStorage) {
  userInfo = JSON.parse(userInfoInStorage);
}

export default {
  isMenuVisible: false,
  commentUserInfo,
  hotList,
  userInfo,
};
